<?php
	require_once('inc_admin.php');
?>
        <div id="content">

            <div class="inner" style="min-height:1200px;">
                <div class="row">
                    <div class="col-xs-12">
    <?php 
    require_once('inc_admin.php');
    connect();
    $sql = 'select * from comments';
    $result = mysql_query($sql) or die ('查询失败！'.mysql_error());
    ?>
    <h1>留言管理</h1>
     <div class="container-fluid col-md-offset-2 col-md-8 col-xs-offset-2 col-xs-8 col-sm-offset-2 col-sm-8">
     <table align="center" class="table table-bordered table-hover ">
     <tr class="success">                              
            <th>序号</th>
            <th>留言内容</th>
            <th>留言人</th>
            <th>发表时间</th>
            <th>操作</th>
     </tr>                              

       <?php
        while($row = mysql_fetch_assoc($result)){
            echo '<tr>';
            echo '<td>'.$row['cid'].'</td>';
            echo '<td>'.$row['content'].'</td>';
            echo '<td>'.$row['uid'].'</td>';
            echo '<td>'.$row['cdate'].'</td>';

 echo '<td>
            <a href="commentDelete.php?id='.$row['cid'].'" onClick="return confirm(\'确定要删除吗？
            \');">删除</a></td>';
            echo '</tr>';
           
            }       
          
        
        echo '</table>';
?>




                    </div>
                </div>
                <hr />
            </div>
        </div>
<?php 
require_once('template/footer.php');
?>
